//
//  ReferTableViewCell.m
//  MyListenMusicFun
//
//  Created by dllo on 16/1/18.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ReferTableViewCell.h"

@implementation ReferTableViewCell



-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self.contentView NightWithType:UIViewColorTypeNormal];
        self.mainImgView = [[UIImageView alloc] init];
//        _mainImgView.backgroundColor = [UIColor cyanColor];
        [self.contentView addSubview:_mainImgView];
        
        
        self.titleLabel = [[UILabel alloc] init];
//        _titleLabel.backgroundColor = [UIColor yellowColor];
        [_titleLabel NightWithType:UIViewColorTypeNormal];
        [self.contentView addSubview:_titleLabel];
 
        
        self.infoLabel = [[UILabel alloc] init];
//        _infoLabel.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_infoLabel];
        _infoLabel.alpha = 0.5;
        [_infoLabel NightWithType:UIViewColorTypeNormal];
        _infoLabel.font = [UIFont systemFontOfSize:15];
        
        self.playImgView = [[UIImageView alloc] init];
//        _playImgView.backgroundColor = [UIColor orangeColor];
        [_playImgView NightWithType:UIViewColorTypeNormal];
        [self.contentView addSubview:_playImgView];
        
        self.numberLabel = [[UILabel alloc] init];
//        _numberLabel.backgroundColor = [UIColor blueColor];
        _numberLabel.alpha = 0.5;
        [_numberLabel NightWithType:UIViewColorTypeNormal];
        [self.contentView addSubview:_numberLabel];
        
        _numberLabel.font = [UIFont systemFontOfSize:12];
        
        self.countImgView = [[UIImageView alloc] init];
//        _countImgView.backgroundColor = [UIColor cyanColor];
        [_countImgView NightWithType:UIViewColorTypeNormal];
        [self.contentView addSubview:_countImgView];
        
        self.countLabel = [[UILabel alloc] init];
//        _countLabel.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_countLabel];
        [_countLabel NightWithType:UIViewColorTypeNormal];
        _countLabel.alpha = 0.5;
        _countLabel.font = [UIFont systemFontOfSize:12];
        
        self.arrowImgView = [[UIImageView alloc] init];
//        _arrowImgView.backgroundColor = [UIColor purpleColor];
        [_arrowImgView NightWithType:UIViewColorTypeNormal];
        [self.contentView addSubview:_arrowImgView];
        _arrowImgView.image = [UIImage imageNamed:@"sign"];
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    _mainImgView.frame = CGRectMake(5 * PW, 5 * PH, 90 * PW, 90 * PH);
    _titleLabel.frame = CGRectMake(100 * PW, 5 * PH, self.contentView.frame.size.width - 15 - 90 - 35, 30 * PH);
    _infoLabel.frame = CGRectMake(100 * PW, 40 * PH, self.contentView.frame.size.width - 15 - 90 - 35, 25 * PH);
    _arrowImgView.frame = CGRectMake(self.contentView.frame.size.width - 25, 40 * PH, 20 * PW, 20 * PH);
    _playImgView.frame = CGRectMake(100 * PW, 77.5 * PH, 15 * PW, 15 * PH);
    _numberLabel.frame = CGRectMake(120 * PW, 75 * PH, 60 * PW, 20 * PH);
    _countImgView.frame = CGRectMake(200 * PW, 77.5 * PH, 15 * PW, 15 * PH);
    _countLabel.frame = CGRectMake(220 * PW, 75 * PH, 50 * PW, 20 *PH);
    _mainImgView.frame = CGRectMake(5, 5, 90, 90);
    _titleLabel.frame = CGRectMake(100, 5, self.contentView.frame.size.width - 15 - 90 - 35, 30);
    _infoLabel.frame = CGRectMake(100, 40, self.contentView.frame.size.width - 15 - 90 - 35, 25);
    _arrowImgView.frame = CGRectMake(self.contentView.frame.size.width - 25, 40, 20, 20);
    _playImgView.frame = CGRectMake(100, 77.5, 15, 15);
    _numberLabel.frame = CGRectMake(120, 75, 60, 20);
    _countImgView.frame = CGRectMake(200, 77.5, 15, 15);
    _countLabel.frame = CGRectMake(220, 75, 50, 20);
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
